{extend name="public/base" /} {block name="body"}
<div class="content-tabs">
	<ol class="breadcrumb">
		<li>
			<a href="{:url('index/index')}"><i class="fa fa-home"></i></a>
		</li>
		<li><strong>修改密码</strong></li>
	</ol>
</div>
<div class="row">
	<div class="col-sm-12">
		<div class="ibox float-e-margins">
			<div class="ibox-title">
				<h5>修改密码</h5>
			</div>
			<div class="ibox-content">
				<form id="myForm" class="form-horizontal m-t" method="post" action="{:url('password')}">
					<div class="form-group">
						<label class="col-sm-3 control-label">旧密码：</label>
						<div class="input-group col-sm-4">
							<input type="password" id="old_pwd" name="old_pwd" placeholder="旧密码" class="form-control">
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">新密码：</label>
						<div class="input-group col-sm-4">
							<input type="password" id="login_pwd" name="login_pwd" placeholder="新密码" class="form-control" />
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">新密码确认：</label>
						<div class="input-group col-sm-4">
							<input type="password" id="login_pwd2" name="login_pwd2" placeholder="新密码确认" class="form-control" />
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<div class="col-sm-4 col-sm-offset-3">
							<button class="btn btn-primary" type="submit"><i class="fa fa-save"></i>保存</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>
{/block} {block name="script"}
<script src="__LIB__/validate/jquery.validate.min.js"></script>
<script src="__LIB__/validate/messages_zh.min.js"></script>
<script src="__LIB__/validate/add_validate.min.js"></script>
<script>
	$(function() {
		$("#myForm").validate({
			rules: {
				old_pwd: "required",
				login_pwd: "required",
				login_pwd2: {
					required: !0,
					minlength: 6,
					equalTo: "#login_pwd"
				}
			},
			messages: {
				old_pwd: ICON.error + "请输入您的旧密码",
				login_pwd: ICON.error + "请输入您的新密码",
				login_pwd2: {
					required: ICON.error + "请再次输入您的新密码",
					minlength: ICON.error + "密码必须6个字符以上",
					equalTo: ICON.error + "两次输入的密码不一致"
				}
			},
			submitHandler: function(form) {
				ajaxForm();
			}
		});
	});
</script>
{/block}